package cn.edu.hatu.bookshop.service;

import cn.edu.hatu.bookshop.dao.ClassifyMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service
public class ClassifyService {
    private ClassifyMapper classifyMapper;
    @Autowired
    public void setClassifyMapper(ClassifyMapper classifyMapper) {
        this.classifyMapper = classifyMapper;
    }
    public String getClassifyName(int classifyId){
        String classifyName = classifyMapper.getClassifyName(classifyId);
        return classifyName;
    }
    public int getClassifyId(String classifyName){
        int classifyId = classifyMapper.getClassifyId(classifyName);
        return classifyId;
    }
}
